/**
 * 
 */
package org.rk.core.jdbc.dao;

import java.util.List;

import org.rk.core.common.bean.PageData;
import org.rk.core.common.bean.QueryData;
import org.rk.core.jdbc.dao.util.ParamMap;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Administrator
 * 2015/4/30
 * @param <T>
 */
public interface IDBDao<T> {

	boolean saveModel(T bean);

	boolean deleteModel(T bean);
	
	Integer deleteByParamMap(Class<T> cs, List<ParamMap> paramMapList);

	Integer deleteWithColumn(T bean, String[] fileds);

	boolean updateModel(T bean);

	boolean updateWithColumn(T bean, String[] fileds);


	T queryForEntity(Class<T> cs, List<ParamMap> paramMapList);

	List<T> queryForList(Class<T> cs, List<ParamMap> paramMapList);

	PageData queryToPage(Class<T> cs, List<ParamMap> paramMapList, PageData page);

	Long saveModelToId(T bean);

	QueryData queryBySql(String sql, List<ParamMap> paramMapList);

	PageData queryBySqlToPage(String sql, List<ParamMap> paramMapList, PageData page);

	void executeBySql(String sql);

	Long queryMaxId(Class<T> cs);

	boolean deleteModelByUnique(T bean);

	boolean updateModelByUnique(T bean);

}
